#include "UpperSetTempNetParamCmd.h"

UpperSetTempNetParamCmd::UpperSetTempNetParamCmd(QObject *parent) :
    BaseCmd(parent)
{
    this->m_protocolType = ProtocolType::CloudProtocol;
    this->m_functionCode = FunctionCode;
    this->m_mode = 0;
}

Package UpperSetTempNetParamCmd::toPackage()
{
    Package package;
    return package;
}

void UpperSetTempNetParamCmd::unPackage(Package package)
{
    m_cmdId = package.id();
    QByteArray body;

    body = decrypt(package.body(),KeyType::AES);

    quint16 index = 0;

    m_mode = body.mid(index,1).toHex().toInt(0,16);
    index += 1;

}

quint8 UpperSetTempNetParamCmd::mode() const
{
    return m_mode;
}

void UpperSetTempNetParamCmd::setMode(const quint8 &mode)
{
    m_mode = mode;
}

